package com.wephone.Student.task;

import java.util.List;
import java.util.Map;

import android.content.Context;
import android.os.AsyncTask;
import android.os.Handler;
import android.os.Message;

import com.wephone.Student.bean.data.CountryData;
import com.wephone.Student.util.Util;

public class GetCountryListAsyncTask extends AsyncTask<Map<String, String>, Void, Void> {
	private Context context;
	private Handler handler;
	
	public GetCountryListAsyncTask(Context context, Handler handler) {
		super();
		this.context = context;
		this.handler = handler;
	}

	@Override
	protected Void doInBackground(Map<String, String>... arg0) {
		List<CountryData> results = Util.getCountryList(context);
		
		Message msg = new Message();
		msg.what=11;
		msg.obj = results;
		handler.sendMessage(msg);
		return null;
	}

}
